package com.luo.chengrui.datapermission.config;

import com.luo.chengrui.datapermission.interceptor.DataPermissionAnnotationAdvisor;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Role;

/**
 * 配置mybatisPlusInterceptor
 */
@AutoConfiguration
public class DataPermissionInterceptorConfiguration {


    /**
     * 权限注解拦截器。
     *
     * @return
     */
    @Bean
    @Role(2)
    public DataPermissionAnnotationAdvisor dataPermissionAnnotationAdvisor() {
        return new DataPermissionAnnotationAdvisor();
    }



}
